<script>
export default {
  name: "tao-table",
  props: {
    data: Array,
  }

}
</script>

<template>
  <table class="layui-table">
    <thead>
    <tr>
      <th>编号</th>
      <th>类型</th>
      <th>名称</th>
      <th>标签</th>
    </tr>
    </thead>

    <tbody>
    <tr v-for="(item,index) in data">
      <td>{{index+1}}</td>
      <td>{{item.type}}</td>
      <td>{{item.name}}</td>
      <td>
        <slot :row="item"></slot>
      </td>
    </tr>
    </tbody>
  </table>
</template>

<style scoped lang="less">
.layui-table {
  thead {
    background-color: #01aaed;
    color: #ffffff;
  }

  tr, th, td {
    text-align: center;
  }
}
</style>